import axios from "../utils/request";

export function login(data) {
  return axios({
    url: "/login",
    method: "get",
    params: data
  });

}
export function getNav() {
  // 获取nav标签
  return axios({
    url: "/login/getnav",
    method: "get",

  });
}
export function getRole() {
  // 获取nav标签
  return axios({
    url: "/getRole",
    method: "get",

  });
}
export function getPermission() {
  // 获取nav标签
  return axios({
    url: "/getpermission",
    method: "get",

  });
}
export function addPermission(data) {
  console.log("方法内data",data)
  return axios.post("/add_permission",data)


}


export function getFarmer(page, limit) {
  return axios({
    url: "/getfarmer?" + "page=" + page + "&limit=" + limit,
        method: "get",

  })
};
export function getUser() {
  return axios({
    url: "/get_user_djs",
    method: "get",

  })
};
  export function addUser(data) {
    console.log("方法内data",data)
    return axios.post("/add_user_djs",data)


  }

